#ifndef _FlashLogBuffMixManager_H_
#define _FlashLogBuffMixManager_H_

#include <stdint.h>
#include <stdlib.h>
#include "rtctime.h"
#include "mix_log.h"

#ifdef __cplusplus
extern "C"
{
#endif

	typedef struct
	{
		uint32_t flash_base;	
		uint32_t page_now;		
		uint32_t site_next;		
		uint16_t dat_addr_last; 
		uint16_t page_amount;	
		uint16_t err;			
		uint16_t checked;		
	} mix_log_buff_info_type;

	typedef struct
	{
		uint32_t buff_amount;										   
		uint32_t first_base;										   
		uint32_t buff_size;											   
		uint32_t page_size;											   
		uint16_t log_size_max;										   
		mix_log_buff_info_type *info;								   
		void (*erase)(uint32_t addr);								   
		void (*program)(uint32_t addr, uint8_t *p_data, uint16_t Len); 
		void (*read)(uint32_t addr, uint8_t *p_data, uint16_t Len);	   
	} mix_log_buff_cfg_type;

#ifdef __cplusplus
}
#endif

#endif
